﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Bastanteo.Domain.Usuario>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Modificacion
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Modificación de Usuarios</h2>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm("Modificar", "Usuario", FormMethod.Post))
       {%>
        <%: Html.ValidationSummary(true) %>
        <fieldset>
            <legend>Datos del Usuario</legend>
            <div class="tdlabelForm"  >
                <%: Html.HiddenFor(model => model.UsuarioId) %>
            </div>

            <div class="display-label">Codigo 
            <%: Html.HiddenFor(model => Model.Codigo)%>
            </div>
            <div class="display-field"><%: Model.Codigo %></div>

            <div class="editor-label">
                Usuario
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.usuario)%>
                <%: Html.ValidationMessageFor(model => Model.usuario)%>
            </div>
            
            <div class="editor-label">
                Contraseña
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Password)%>
                <%: Html.ValidationMessageFor(model => Model.Password)%>
            </div>
            <div class="editor-label">
                Rol
            </div>
            <div class="editor-field">
<%--                <%: Html.TextBoxFor(model => model.Rol.RolDescripcion) %>
                <%: Html.ValidationMessageFor(model => model.Rol.RolDescripcion)%>--%>
                <%: Html.DropDownList("rolCodigo", (IEnumerable<SelectListItem>)TempData["Roles"]) %>
            </div>
            <p>
                <input type="submit" value="Guardar" Class="btnout" style="width:70px"/>
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Regresar a la lista", "Index") %>
    </div>

</asp:Content>

